package cn.change.org.domain;

import cn.afterturn.easypoi.excel.annotation.Excel;
import cn.change.basic.domain.BaseDomain;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Data;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * @author 16252
 */
@Data
public class Shop  extends BaseDomain {
    /**
     * 名字
     */
    @Excel(name = "店铺名字",orderNum = "1",width = 30,isImportField = "true_st")
    private String name;

    /**
     * 电话
     */
    @Excel(name = "联系电话",orderNum = "2",width = 30,isImportField = "true_st")
    private String tel;
    /**
     * 注册时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GTM+8")
    @Excel(name = "注册时间",orderNum = "3",width = 30,isImportField = "true_st" ,exportFormat = "yyyy-MM-dd")
    private Date registerTime = new Date();
    @Excel(name = "状态",orderNum = "4",width = 30,isImportField = "true_st")
    private Integer state;
    /**
     * 地址
     */
    @Excel(name = "地址",orderNum = "5",width = 30,isImportField = "true_st")
    private String address;
    /**
     * logo
     */
    @Excel(name = "店铺图片",orderNum = "6",width = 30,isImportField = "true_st")
    private String logo;
    /**
     * 管理员ID
     */
    private Long admin_id;
    /**
     * 管理员
     */
    private Employee admin;

    /**
     * 我的二傻子
     * JsonInclude去除 最后一级子类多余的框框
     */
    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    private List<Shop> children = new ArrayList<>();
}
